package com.ikas.ai.server.module.instance.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ikas.ai.server.module.instance.dorisDao.DorisWorkInstanceStepDao;
import com.ikas.ai.server.module.instance.model.DorisWorkInstanceStep;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 工况转换实例步骤表
 *
 * @author hu.bowei
 * @email hu.bowei@ikasinfo.com
 * @date 2023-05-06 17:27:58
 */
@Service
public class DorisWorkInstanceStepService extends ServiceImpl<DorisWorkInstanceStepDao, DorisWorkInstanceStep> {

    @Autowired
    private DorisWorkInstanceStepDao dorisWorkInstanceStepDao;

    public List<DorisWorkInstanceStep> getListByInstanceId(Long instanceId) {
        LambdaQueryWrapper<DorisWorkInstanceStep> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(DorisWorkInstanceStep::getWfInstanceId, instanceId);
        return dorisWorkInstanceStepDao.selectList(queryWrapper);
    }
}